<template>
	<view class="center">
		<view class="user" v-if="list3.length>0">
			<view class="user-item" v-for="(item,index) in list3" :key="index" >
				<view class="time">
					<view>预约到访</view>
					<view class="tm">{{item.time}}</view>
				</view>
				<view class="title">
					<view class="">
						<text class="label">宝宝姓名：</text><text class="cont">{{ item.name1 }}</text>
					</view>

				</view>
				<view class="title">
					<view class="">
						<text class="label">家长姓名：</text><text class="cont">{{ item.name2 }}</text>
					</view>

				</view>
				<view class="title">
					<view class="">
						<text class="label">联系方式：</text><text class="cont">{{ item.name2 }}</text>
					</view>
				</view>
				<view class="title">
					<view class="">
						<text class="label">预约到访时间：</text><text class="cont">{{ item.name2 }}</text>
					</view>
				</view>
				<view class="btn_list">
					<view class="btn" @click="handleGoRouter(`/pages_teach_db/schedule-visit/follow-up`)" >跟进</view>|
					<view class="btn btn_center" @click="handleGoRouter(`/pages_teach_db/schedule-visit/edit`)">编辑</view>|
					<view class="btn" @click="handleGoRouter('/pages_teach_db/schedule-visit/info')">详情</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import debug from "@/pages_base/common/debug.vue";
	import appMixin from "@/mixins/app";

	export default {
		mixins: [appMixin],
		computed: {
			debug() {
				return debug
			}
		},
		data() {
			return {
				list3: [{
						name1: '宝宝姓名',
						name2: '线索管理',
						time: '2025-02-01',
						type1: '线索管理',
						type2: '线索管理',
						phone: '12121',
						img: '',
						url: ''
					},
					{
						name1: '线索管理',
						name2: '线索管理',
						time: '2025-02-01',
						type1: '线索管理',
						type2: '线索管理',
						phone: '12121',
						img: '',
						url: ''
					}, {
						name1: '线索管理',
						name2: '线索管理',
						time: '2025-02-01',
						type1: '线索管理',
						type2: '线索管理',
						phone: '12121',
						img: '',
						url: ''
					},
				]
			};
		},
		methods: {
			handleGoRouter(url){
				this.$u.route({
					url: url,
				})
			},
			Add(index, item = null) {
				this.$u.route({
					url: `/pages_teach_db/memo-add/memo-add?data=${JSON.stringify(item)}`,
				})
			},
			remove(item) {
				console.log('删除', item)
				uni.showModal({
					title: '提示',
					content: '是否删除这条备忘录？',
					showCancel: true,
					success: (res) => {
						console.log('res', res)
						if (res.confirm) {
							this.$u.toast('删除成功');
						}
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .u-size-medium {
		display: inline-flex;
		width: auto;
		font-size: 26rpx;
		height: 52rpx !important;
		line-height: 52rpx !important;
		padding: 0 30rpx !important;
	}

	.center {
		height: 100%;
		width: 100%;
		overflow-y: auto;
		position: relative;

		.user {
			height: 100%;
			overflow-y: auto;
			background-color: #f9f9f9;

			.user-item {
				display: flex;
				align-items: center;
				padding: 32rpx;
				margin: 32rpx;
				background-color: #fff;
				border-radius: 20rpx;
				flex-direction: column;

				.time {
					display: flex;
					justify-content: space-between;
					width: 100%;
					padding: 20rpx 0rpx;
					border-bottom: 2rpx dashed #EDEEF0;
					color: #333333;
					font-weight: bold;
					font-size: 32rpx;

					.tm {
						font-weight: 400;
						font-size: 28rpx;
						color: #999999;
					}
				}

				.title {
					width: 100%;
					display: flex;
					justify-content: space-between;
					margin-top: 24rpx;

					.label {
						font-weight: 400;
						font-size: 28rpx;
						color: #999999;
					}

					.cont {
						font-weight: 400;
						font-size: 28rpx;
						color: #333333;
						overflow: hidden;
						white-space: nowrap;
						text-overflow: ellipsis;
						margin-left: 10rpx;
					}

				}

				.btn_list {
					color: #DBDBDB;
					margin-top: 24rpx;
					padding-top: 20rpx;
					display: flex;
					justify-content: flex-end;
					width: 100%;
					border-top: 2rpx dashed #EDEEF0;
					.btn{
						font-weight: 500;
						font-size: 32rpx;
						color: #FF8B00;
						padding: 0rpx 70rpx;
					}
					
				}
			}
		}

		.nothing {
			height: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;
		}

		.myPlus {
			position: fixed;
			bottom: 10vh;
			right: 40rpx;
			padding: 10rpx;
			border-radius: 50%;
			border: 5rpx solid;
			z-index: 999;
			background-color: #fff;
		}
	}
</style>